-
-
Notifications
You must be signed in to change notification settings - Fork 50
Allow ruff to be used as a formatter #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks! I tried it in a project that renders quite a lot of docstrings, and I don't see any flagrant perf hit. |
Something might be missing though: the signatures aren't actually formatted 😅 Does it work on your side? |
|
Once I add and use the Its stderr is:
I guess we simply have to split that. |
|
OK working with the suggestion above. Let me re-check the perfs. UPDATE: same, no perf hit. |
|
Before merging the PR (if that goes through), the documentation needs to be updated (and some of the docstrings) to reflect that now it can also use |
d86eb0e to
4fc2f4a
Compare
|
Thanks! Looking great 🙂 I just noticed a "bug" within the code that handles cross-references in signatures: the code currently replaces def xxxxxxxxxxxxx(_N8CL: _8E, _CaOSB3U7V0pPKKf: _r9 | None = None, _qIcd: _cE3[_uQ] | None = None, _iaxfH: _pI = 'en', _kCT1PbcXbF3Nhl5kcSLp: _cIW | None = None, _FrMwcKw: _LW): passWe should fix this before merging 🤔 I'll do this in another commit/PR. We'll probably have to modify the |
|
Done, merging! |
|
Thanks again @DarkaMaul 🚀 |
|
Happy this is moving along - was just thinking about this |
Until astral-sh/ruff#659 is implemented, it could still be helpful to use
ruffto format the signatures.Feel free to close the PR if you believe the perf impact is too big when spanning multiple subprocesses.